package cn.ibdsr.human.transfer.company;

import cn.ibdsr.human.core.check.Verfication;
import cn.ibdsr.human.db.model.BaseDTO;
import cn.ibdsr.human.util.RegUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.time.LocalDateTime;

@ApiModel("保存企业信息DTO")
@Data
public class CompanySaveDTO extends BaseDTO {

    /**
     * 企业名称
     */
    @ApiModelProperty(value = "企业名称",required = true)
    @NotEmpty(message = "企业名称不能为空" )
    protected String name;


    /**
     * 信用代码
     */
    @ApiModelProperty(value = "信用代码",required = true)
    @NotEmpty(message = "信用代码不能为空" )
    @Pattern(regexp = RegUtils.CREDIT_CODE, message = "企业统一信用代码格式错误")
    protected String creditCode;

    /**
     * 企业性质ID
     */
    @ApiModelProperty(value = "企业性质ID",required = true)
    @NotNull(message = "企业性质ID不能为空" )
    protected Integer proper;

    /**
     * 企业规模
     */
    @ApiModelProperty(value = "企业规模",required = true)
    @NotEmpty(message = "企业规模不能为空" )
    protected String peopleCnt;


    /**
     * 详细地址
     */
    @ApiModelProperty(value = "地址",required = true)
    @NotEmpty(message = "地址不能为空" )
    protected String address;
    /**
     * 营业执照图片
     */
    @ApiModelProperty(value = "营业执照图片",required = true)
    @NotEmpty(message = "营业执照图片不能为空" )
    protected String licenseImage;



    /**
     * 企业法人
     */
    @ApiModelProperty(value = "企业法人姓名",required = true)
    @NotEmpty(message = "企业法人姓名不能为空" )
    protected String legalPerson;

    /**
     * 法人身份证
     */
    @ApiModelProperty(value = "法人身份证",required = true)
    @NotEmpty(message = "法人身份证不能为空" )
    @Pattern(regexp = RegUtils.ID_CARD_NO, message = "法人身份证号码格式错误")
    protected String legalIdCardNo;

    /**
     * 企业介绍
     */
    @ApiModelProperty(value = "企业介绍")
    @Length(max = 300,message = "长度不超过300个字")
    protected String intro;

    /**
     * 联系人
     */
    @ApiModelProperty(value = "联系人",required = true)
    @NotEmpty(message = "联系人不能为空" )
    protected String contactName;

    /**
     * 联系人手机号
     */
    @ApiModelProperty(value = "联系人手机号",required = true)
    @NotEmpty(message = "联系人手机号不能为空" )
    @Pattern(regexp = RegUtils.MOBILE_PHONE, message = "手机号码格式错误")
    protected String contactPhone;

    /**
     * 联系人职务
     */
    @ApiModelProperty(value = "联系人职务",required = true)
    @NotEmpty(message = "联系人职务不能为空" )
    protected String contactJob;


    /**
     * 状态（0-未认证；1-待认证）
     */
    @ApiModelProperty(value = "状态（  企业[0-不提交认证；1-提交认证]   平台[ 2-认证成功；3-认证失败] ）" )
    protected Integer status;


}
